<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <button onclick="add()">点击</button>
  <div id="app"></div>
  <script>
    let value=0
    let app=document.getElementById('app')

    function deco(fun,wait){
      var a=1
      return function () {
        a+=1
        console.log('a',a);
      }
    }
    let deco2=deco()
    function add() {
      deco2()
    }
    function add2() {
      value+=1
      app.innerText=value
    }
    add2()

    function workfun(...args) {
      let sum=undefined
      args.forEach(item=>sum+=item)
      return sum
    }

    function curry(fn){
      let parmas=[]
      return function temp(...args){
        if (args.length) {
          
        }
      }
    }

  </script>
</body>
</html>